package com.chlp.core.framework.dao;

import com.chlp.core.framework.utils.Assist;
import com.chlp.core.framework.utils.AssistInsert;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap;
import java.util.List;

/**
 * @author 陈礼鹏
 * @date 2020/1/16 17:23
 */
public interface CommonCurdDao {

	/**
	 * 查
	 */
	List<?> queryByConditionPage(@Param("assist") Assist assist, @Param("curdResultType") Class<?> resultType);

	/**
	 * 查
	 */
	List<HashMap<String, Object>> queryByConditionReturnMapPage(@Param("assist") Assist assist);

	/**
	 * 增
	 */
	void insertOne(AssistInsert assist);

	/**
	 * 批量增
	 */
	void insertList(List<AssistInsert> list);

	/**
	 * 删
	 */
	void delete(Assist assist);

	/**
	 * 改
	 */
	void updateById(AssistInsert assist);

	/**
	 * 改
	 */
	void updateByAssist(@Param("entity") AssistInsert entity, @Param("assist") Assist assist);
}
